home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / content / nsIScriptLoaderObserver.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  138 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptLoaderObserver.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptLoaderObserver_h__
  6. #define __gen_nsIScriptLoaderObserver_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIScriptElement; /* forward declaration */
  18.  
  19. class nsIURI; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIScriptLoaderObserver */
  23. #define NS_ISCRIPTLOADEROBSERVER_IID_STR "501209d3-7edf-437d-9948-3c6d1c08ef7f"
  24.  
  25. #define NS_ISCRIPTLOADEROBSERVER_IID \
  26.   {0x501209d3, 0x7edf, 0x437d, \
  27.     { 0x99, 0x48, 0x3c, 0x6d, 0x1c, 0x08, 0xef, 0x7f }}
  28.  
  29. class NS_NO_VTABLE nsIScriptLoaderObserver : public nsISupports {
  30.  public: 
  31.  
  32.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTLOADEROBSERVER_IID)
  33.  
  34.   /**
  35.    * The script is available for evaluation. For inline scripts, this
  36.    * method will be called synchronously. For externally loaded scripts,
  37.    * this method will be called when the load completes.
  38.    *
  39.    * @param aResult A result code representing the result of loading
  40.    *        a script. If this is a failure code, script evaluation
  41.    *        will not occur.
  42.    * @param aElement The element being processed.
  43.    * @param aIsInline Is this an inline script or externally loaded?
  44.    * @param aWasPending Did script processing have to be delayed,
  45.    *                    either for loading of an external script or
  46.    *                    because processing of an earlier scheduled
  47.    *                    script was delayed?
  48.    * @param aURI What is the URI of the script (the document URI if
  49.    *        it is inline).
  50.    * @param aLineNo At what line does the script appear (generally 1
  51.    *        if it is a loaded script).
  52.    * @param aScript String representation of the string to be evaluated.
  53.    */
  54.   /* void scriptAvailable (in nsresult aResult, in nsIScriptElement aElement, in boolean aIsInline, in boolean aWasPending, in nsIURI aURI, in PRInt32 aLineNo, in AString aScript); */
  55.   NS_IMETHOD ScriptAvailable(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending, nsIURI *aURI, PRInt32 aLineNo, const nsAString & aScript) = 0;
  56.  
  57.   /**
  58.    * The script has been evaluated.
  59.    *
  60.    * @param aResult A result code representing the success or failure of
  61.    *        the script evaluation.
  62.    * @param aElement The element being processed.
  63.    * @param aIsInline Is this an inline script or externally loaded?
  64.    * @param aWasPending Did script processing have to be delayed,
  65.    *                    either for loading of an external script or
  66.    *                    because processing of an earlier scheduled
  67.    *                    script was delayed?
  68.    */
  69.   /* void scriptEvaluated (in nsresult aResult, in nsIScriptElement aElement, in boolean aIsInline, in boolean aWasPending); */
  70.   NS_IMETHOD ScriptEvaluated(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending) = 0;
  71.  
  72. };
  73.  
  74. /* Use this macro when declaring classes that implement this interface. */
  75. #define NS_DECL_NSISCRIPTLOADEROBSERVER \
  76.   NS_IMETHOD ScriptAvailable(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending, nsIURI *aURI, PRInt32 aLineNo, const nsAString & aScript); \
  77.   NS_IMETHOD ScriptEvaluated(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending); 
  78.  
  79. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  80. #define NS_FORWARD_NSISCRIPTLOADEROBSERVER(_to) \
  81.   NS_IMETHOD ScriptAvailable(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending, nsIURI *aURI, PRInt32 aLineNo, const nsAString & aScript) { return _to ScriptAvailable(aResult, aElement, aIsInline, aWasPending, aURI, aLineNo, aScript); } \
  82.   NS_IMETHOD ScriptEvaluated(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending) { return _to ScriptEvaluated(aResult, aElement, aIsInline, aWasPending); } 
  83.  
  84. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  85. #define NS_FORWARD_SAFE_NSISCRIPTLOADEROBSERVER(_to) \
  86.   NS_IMETHOD ScriptAvailable(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending, nsIURI *aURI, PRInt32 aLineNo, const nsAString & aScript) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScriptAvailable(aResult, aElement, aIsInline, aWasPending, aURI, aLineNo, aScript); } \
  87.   NS_IMETHOD ScriptEvaluated(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScriptEvaluated(aResult, aElement, aIsInline, aWasPending); } 
  88.  
  89. #if 0
  90. /* Use the code below as a template for the implementation class for this interface. */
  91.  
  92. /* Header file */
  93. class nsScriptLoaderObserver : public nsIScriptLoaderObserver
  94. {
  95. public:
  96.   NS_DECL_ISUPPORTS
  97.   NS_DECL_NSISCRIPTLOADEROBSERVER
  98.  
  99.   nsScriptLoaderObserver();
  100.  
  101. private:
  102.   ~nsScriptLoaderObserver();
  103.  
  104. protected:
  105.   /* additional members */
  106. };
  107.  
  108. /* Implementation file */
  109. NS_IMPL_ISUPPORTS1(nsScriptLoaderObserver, nsIScriptLoaderObserver)
  110.  
  111. nsScriptLoaderObserver::nsScriptLoaderObserver()
  112. {
  113.   /* member initializers and constructor code */
  114. }
  115.  
  116. nsScriptLoaderObserver::~nsScriptLoaderObserver()
  117. {
  118.   /* destructor code */
  119. }
  120.  
  121. /* void scriptAvailable (in nsresult aResult, in nsIScriptElement aElement, in boolean aIsInline, in boolean aWasPending, in nsIURI aURI, in PRInt32 aLineNo, in AString aScript); */
  122. NS_IMETHODIMP nsScriptLoaderObserver::ScriptAvailable(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending, nsIURI *aURI, PRInt32 aLineNo, const nsAString & aScript)
  123. {
  124.     return NS_ERROR_NOT_IMPLEMENTED;
  125. }
  126.  
  127. /* void scriptEvaluated (in nsresult aResult, in nsIScriptElement aElement, in boolean aIsInline, in boolean aWasPending); */
  128. NS_IMETHODIMP nsScriptLoaderObserver::ScriptEvaluated(nsresult aResult, nsIScriptElement *aElement, PRBool aIsInline, PRBool aWasPending)
  129. {
  130.     return NS_ERROR_NOT_IMPLEMENTED;
  131. }
  132.  
  133. /* End of implementation class template. */
  134. #endif
  135.  
  136.  
  137. #endif /* __gen_nsIScriptLoaderObserver_h__ */
  138.